home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
turbotut.arc
/
REALMATH.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-06-30
|
889b
|
23 lines
PROGRAM real_math_demo;
VAR a,b,c,d : REAL;
BEGIN
a := 3.234; {simply assigning a value}
b := a + 1.101; {adding a constant}
c := a + b; {summing two variables}
d := 4.234*a*b; {multiplication}
d := 2.3/b; {division}
d := a - b; {subtraction}
d := (a + b)/(12.56-b); {example of a multiple expression}
{Pascal has no expression for
raising a number to a power.
It must be done with the log and
exp functions}
{The trigonometric functions, log functions and others are available
as predefined routines. See pages 139 to 141 of the TURBO reference
manual for a complete list}
{ It will be left up to you to print out some of the above values}
END.